{% set APP = pillar['app'] %}
{% set GIT_COMMIT = pillar['git_commit'] %}
{% set APP_DIR =  pillar['app_dir'] %}
replace_conf:
  file.recurse:
    - name: {{APP_DIR}}/{{APP}}/conf
    - source: salt://backup/{{APP}}/{{GIT_COMMIT}}/conf
    - include_empty: True
    - replace: True
    - clean: True

replace_lib:
  file.recurse:
    - name: {{APP_DIR}}/{{APP}}/lib
    - source: salt://backup/{{APP}}/{{GIT_COMMIT}}/lib
    - include_empty: True
    - replace: True
    - clean: True
